package db

import (
	"GraduationProject/public/tools"
	"github.com/olivere/elastic"
)

var ElasticClient *elastic.Client

func ElasticSearchConnect() {
	var err error
	ElasticClient, err = elastic.NewClient(
		elastic.SetURL(tools.Conf.Get("elastic_host")),
		elastic.SetSniff(false),
	)
	if err != nil {
		panic(err)
	}
}
